import requests
s = requests.Session()
host = 'http://10.0.108.4:3000'
def login_index():
    r=s.get(host+"/")
    # print(r.text)
def login_json(username,password):
    data1 = {"username":username,"password":password}
    r=s.post(host+"/hanson-lcdp/sys/login",json=data1)
    print(r.text)
def login(username,password):
	login_index()
	login_json(username,password)
	# login_index(()=>{
	#     login_true(username,password,cb);
	# })

# s.get('http://httpbin.org/cookies/set/sessioncookie/123456789')
# r = s.get("http://httpbin.org/cookies")
login("mahongquan","123456")
r=s.get(host+"/hanson-lcdp/category/getCategoryList",params={"type":2})
print(r.text)
